package chapter20;

public class Chapter20Main {

    public static void main(String[] args) {
        int u = 16;
        Proto_vEB.P_vEB V = Proto_vEB.createP_vEB(u);
        Proto_vEB.insert(V, 2);
        Proto_vEB.insert(V, 3);
        Proto_vEB.insert(V, 4);
        Proto_vEB.insert(V, 5);
        Proto_vEB.insert(V, 7);
        Proto_vEB.insert(V, 14);
        Proto_vEB.insert(V, 15);
        int mem = Proto_vEB.member(V, 4);
        System.out.println("mem->" + mem);
        Proto_vEB.delete(V, 2);
        Proto_vEB.delete(V, 15);
        int min = Proto_vEB.minimum(V);
        System.out.println("min->" + min);
        int max = Proto_vEB.maximum(V);
        System.out.println("max->" + max);
        int succ = Proto_vEB.successor(V, 3);
        System.out.println("succ->" + succ);
        int pre = Proto_vEB.predecessor(V, 5);
        System.out.println("pre->" + pre);

        int u1 = 16;
        Tree_vEB.vEB V1 = Tree_vEB.createTree_vEB(u1);
        Tree_vEB.insertTree_vEB(V1, 2);
        Tree_vEB.insertTree_vEB(V1, 3);
        Tree_vEB.insertTree_vEB(V1, 4);
        Tree_vEB.insertTree_vEB(V1, 5);
        Tree_vEB.insertTree_vEB(V1, 7);
        Tree_vEB.insertTree_vEB(V1, 14);
        Tree_vEB.insertTree_vEB(V1, 15);
        boolean b = Tree_vEB.member(V1, 4);
        System.out.println("mem1->" + b);
        Tree_vEB.deleteTree_vEB(V1, 2);
        Tree_vEB.deleteTree_vEB(V1, 15);
        int min1 = Tree_vEB.minimum(V1);
        System.out.println("min->" + min1);
        int max1 = Tree_vEB.maximum(V1);
        System.out.println("ma1x->" + max1);
        int succ1 = Tree_vEB.successor(V1, 3);
        System.out.println("succ1->" + succ1);
        int pre1 = Tree_vEB.predecessor(V1, 5);
        System.out.println("pre1->" + pre1);
    }
}
